<template>
  <div class="setting">
    <ul>
      <li>设置</li>
      <li>订单</li>
      <li @click="logout">退出</li>
    </ul>
  </div>
</template>

<script>
export default {
  methods: {
    logout() {
      localStorage.removeItem("token");
      this.$router.push("/login");
    },
  },
};
</script>

<style lang="scss" scoped>
.setting {
  ul {
    display: flex;
    padding: 0;
    margin: 0;
    li {
      list-style: none;
      margin-left: 10px;
      cursor: pointer;
    }
    li:hover {
      color: gold;
    }
  }
}
</style>